<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>生活邦荟后台管理系统</title>
		<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/common/css/bootstrap.min.css" />
		<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/admin/css/bootstrap-responsive.min.css" />
		<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/admin/css/backstage_common.css" />
		<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/common/css/iconfont.css" />
		<link  rel="stylesheet" href="<%=request.getContextPath()%>/resources/admin/css/productManage.css" />
	    <link href="<%=request.getContextPath()%>/resources/jquery-ui-1.9.2.custom/css/ui-lightness/jquery-ui-1.9.2.custom.css" rel="stylesheet">
		<script src="<%=request.getContextPath()%>/resources/jquery-ui-1.9.2.custom/js/jquery-1.8.3.js"></script>
		<script src="<%=request.getContextPath()%>/resources/jquery-ui-1.9.2.custom/js/jquery-ui-1.9.2.custom.js"></script>
	</head>
	<body>
        <jsp:include page="./navbar.jsp"></jsp:include>
		<div class="container-fluid-full">
			<div class="row-fluid">
				<!--侧边栏-->
				<div id="sidebar-left" class="span1">
					<div class="nav-collapse sidebar-nav">
					</div>
				</div>
				<!--主要内容-->
				<div class="" id="content">
					<div class="row-fluid form-horizontal">
						<div class="form-group">
							<label class="control-label" for="productName">标题：</label>
							<input class="form-control" placeholder="请输入标题" type="text"  id="title"/>
							<a style="color:#CC0033;display:none" id="tTip">标题不能为空</a>
						</div>
						<div class="form-group">
							<label class="control-label" for="productName" id="productCategory">类别：</label>
							<!--一级商品分类  -->
							<select class="form-control" id="firstLevelProductCategory">
							   <c:forEach var="item" items="${productCategorys }">
							   		<option value="${item.productCategoryId }">${item.productCategoryName }</option>
							   </c:forEach>
							</select>
						</div>
						<div class="form-group">
							<label class="control-label" for="productOrderInfo" >内容：</label>
							<textarea rows="3" cols="20" class="form-control" id="blogContent"></textarea>
						    <a style="color:#CC0033;display:none" id="cTip">内容不能为空</a>
						</div>
						<div class="form-group">
							<label class="control-label" for="productName">发布时间：</label>
							<input class="form-control" placeholder="请输入发布时间" type="text"  id="date"/>
							<a style="color:#CC0033;display:none" id="dTip">发布时间不能为空</a>
						</div>
						<div class="form-group">
							<label class="control-label" for="productName">发布人：</label>
							<label><input name="Fruit" type="radio" value="0" />管理员 </label> 
							<label><input name="Fruit" type="radio" value="1" />普通用户</label> 
							<a style="color:#CC0033;display:none" id="uTip">必选</a>
						</div>
						<div class="form-group">
							<label class="control-label" for="productName">是否发布：</label>
							<input class="form-control" type="checkbox"  id="checkbox"/>
						</div>
						<!--商品 详情图  -->
						<%-- <div class="form-group" id="xiangqingContainer">
							<label class="control-label">详情：</label>
							<div class="pic_container">
								<span><button class="btn btn-danger" id="xiangqing"><i class="iconfont">&#xe62e;</i>上传图片</button></span>
								<span class="tip">请上传1-10张图片</span>
								<a style="color:#CC0033;display:none" id="dtTip">最少要一张图片</a>
								<ul class="pic_list" id="detailImage">
									<c:forEach var="item" items="${productDetailDrawings }">
										<li>
											<span class="iconfont">&#xe637;</span>
											<img src="${item.productDetailDrawingUrl }" />
										</li>
									</c:forEach>									
								</ul>
							</div>
						</div> --%>
						<%-- <!--商品属性  -->
						<div class="form-group value-container attrContanier" id="attrContanier">
							<label class="form-group control-label">
								属性：
							</label>
							<c:forEach var="item" items="${productAttributeAndValues }">
								<span class="btn btn-info" data-toggle="modal" data-target="#correctTypeModal" id="${item.productAttributeId }" data-val='${item.dataval }' data-uuid='${item.dateuuid }' disabled="disabled">${item.productAttributeName }</span>							
							</c:forEach>
							<button class="btn btn-default add_type" id="add_type" style="font-size: 20px;" data-toggle="modal" data-target="#addTypeModal" >
								+
							</button>
						</div> --%>
						<!--选择应用的提示  -->
						<div class="form-group">
			                <a style="color:#CC0033;display:none" id="selectedTip">至少选择一个应用</a>
						</div>
					<%-- 	<div class="form-group">
							<label class="control-label" for="">上架时间：</label>
			                <input class="laydate-icon" id="startTime" value="${startOnlineTime }" />
			                <a style="color:#CC0033;display:none" id="stTip">开始时间不能为空</a>
						</div>
						<div class="form-group">
							<label class="control-label" for="">下架时间：</label>
			                <input class="laydate-icon" id="endTime" value="${endOnlineTime }" />
			                <a style="color:#CC0033;display:none" id="elTip">结束时间不能为空</a>
						</div> --%>
					</div>
					<div class="submit_container">
						<button class="btn btn-info submitProduct" id="addBlog">保存</button>
					</div>
				</div>
			</div>
		</div>
		<!--模态框-->
		<!--添加属性-->
		<div class="modal hide fade" id="addTypeModal" data-to="">
		  <div class="modal-header">
		    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		    <h3>添加属性</h3>
		  </div>
		  <div class="modal-body">
		    <p>
		    	属性名：
		    	<input class="form-control typeName" placeholder="请输入属性名"/>
		    </p>
		    <p>
		    	属性值：
		    	<input class="form-control typeValue" placeholder="请输入属性值"/>
		    	<button class="btn btn-info addTypeValueDetail">添加属性</button>
		    </p>
		    <p class="type-value-container">
		    	<!--<span class="btn btn-default">
		    		<span class="typeValueDetail">白</span>
		    		<span class="typeValueDetailRemove">X</span>
		    	</span>-->
		    </p>
		    <p style="color: #f00;font-size: 12px;">
		    	提示：一旦生成规格，将不可对属性进行任何操作；如要修改属性，请重新创建商品
		    </p>
		  </div>
		  <div class="modal-footer">
		    <a href="#" class="btn cancel">取消</a>
		    <a href="#" class="btn btn-primary confirm-type">确认保存</a>
		  </div>
		</div>
		<!--修改属性-->
		<div class="modal hide fade" id="correctTypeModal" data-to="">
		  <div class="modal-header">
		    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		    <h3>修改属性名</h3>
		  </div>
		  <div class="modal-body">
		    <p>
		    	属性名：
		    	<input class="form-control typeName" placeholder="请输入属性名"/>
		    </p>
		    <p>
		    	属性值：
		    	<input class="form-control typeValue" placeholder="请输入属性值"/>
		    	<button class="btn btn-info addTypeValueDetail">添加属性</button>
		    </p>
		     <p class="type-value-container">
		    	<!--<span class="btn btn-default">
		    		<span class="typeValueDetail">白</span>
		    		<span class="typeValueDetailRemove">X</span>
		    	</span>-->
		    </p>
		    <p style="color: #f00;font-size: 12px;">
		    	一旦生成规格，将不可对属性进行任何操作；如要修改属性，请重新创建商品
		    </p>
		  </div>
		  <div class="modal-footer">
		    <button href="#" class="btn remove-type">删除属性</button>
		    <button href="#" class="btn btn-primary confirm-type">确认保存</button>
		  </div>
		</div>
		<!--确定录入-->
		<div class="modal hide" id="confirmTypeModal">
		  <div class="modal-header">
		    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		    <h3>生成规格</h3>
		  </div>
		  <div class="modal-body">
		  	<p style="color: #f00;font-size: 12px;">
		    	提示：规格一旦生成，将不能修改属性或者再次生成规格！
		    </p>
		  </div>
		  <div class="modal-footer">
		    <a href="#" class="btn cancel">取消</a>
		    <a href="#" class="btn btn-primary confirm-add-type">确定生成</a>
		  </div>
		</div>
	</body>
	<script type="text/javascript">
	$( "#date" ).datepicker();
	</script>
	<%-- <script src="<%=request.getContextPath()%>/resources/common/js/jquery-1.9.1.min.js"></script> --%>
	<script src="<%=request.getContextPath()%>/resources/common/js/bootstrap.min.js"></script>
	<script src="<%=request.getContextPath()%>/resources/admin/js/admin.js"></script>
	<script src="<%=request.getContextPath()%>/resources/admin/js/productManage.js"></script>
	<script src="<%=request.getContextPath()%>/resources/common/js/common.js"></script>
	<script src="<%=request.getContextPath()%>/resources/admin/js/qiniu.js"></script>
    <script src="<%=request.getContextPath()%>/resources/admin/js/plupload.full.min.js"></script>
    <script src="<%=request.getContextPath()%>/resources/admin/js/plupload.min.js"></script>
    <script src="<%=request.getContextPath()%>/resources/admin/interactive/blogAdd.js"></script>
</html>